<%@ Page Language="C#" MasterPageFile="~/RioCMS.Master" AutoEventWireup="true" CodeBehind="Default.aspx.cs"
	Inherits="WebView.Template.Default" Title="RioCMS - Gerenciar Templates" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="main" runat="server">
	<h3>Template</h3>
	<asp:Panel ID="PanelGrid" runat="server">
		<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataKeyNames="id"
			AutoGenerateSelectButton="True" BackColor="LightGoldenrodYellow" BorderColor="Tan"
			BorderWidth="1px" CellPadding="2" ForeColor="Black" GridLines="None">
			<PagerStyle BackColor="PaleGoldenrod" ForeColor="DarkSlateBlue" HorizontalAlign="Center" />
			<SelectedRowStyle BackColor="Chocolate" ForeColor="ControlDark" />
			<FooterStyle BackColor="Tan" />
			<Columns>
				<asp:BoundField DataField="id" Visible="false" />
				<asp:BoundField DataField="nome" HeaderText="nome" ReadOnly="True" />
				<asp:hyperlinkfield datatextfield="arquivo"
					datatextformatstring="{0:c}"
					datanavigateurlfields="arquivo"
					datanavigateurlformatstring="~\File\FileTemplates\{0}"          
					headertext="arquivo"
					target="_blank" />
			</Columns>
			<HeaderStyle BackColor="Tan" Font-Bold="True" />
			<AlternatingRowStyle BackColor="PaleGoldenrod" />
		</asp:GridView>
		<asp:Button ID="ButtonAdicionar" runat="server" OnClick="ButtonAdicionar_Click" 
			Text="Adicionar" Width="100px" />
		<asp:Button ID="ButtonRemover" runat="server" OnClick="ButtonRemover_Click" 
			Text="Remover" Width="100px" />
	</asp:Panel>
	<asp:Panel ID="PanelForm" runat="server" Visible="false" Height="150px">
		<fieldset style="height: 120px;"><legend>Adicionar</legend>
			<asp:Label ID="LabelNome" runat="server" Text="Nome"></asp:Label><br />
			<asp:TextBox ID="TextBoxNome" runat="server"></asp:TextBox>
			<asp:RequiredFieldValidator id="RequiredFieldValidator1"
                    ControlToValidate="TextBoxNome"
                    Display="Dynamic"  
                    ErrorMessage="O campo nome e obrigatorio."
                    runat="server"/><br />
			<asp:Label ID="LabelArquivo" runat="server" Text="Arquivo"></asp:Label><br />
			<asp:FileUpload ID="FileUploadArquivo" runat="server"></asp:FileUpload>
			<asp:RequiredFieldValidator id="RequiredFieldValidator2"
                    ControlToValidate="FileUploadArquivo"
                    Display="Dynamic"
                    ErrorMessage="O campo arquivo e obrigatorio."
                    runat="server"/><br />
		</fieldset>
		<asp:Button ID="ButtonConfirmar" runat="server" OnClick="ButtonConfirmar_Click" 
			Text="Confirmar" Width="100px" CausesValidation="true" />
		<asp:Button ID="ButtonCancelar" runat="server" OnClick="ButtonCancelar_Click" 
			Text="Cancelar" Width="100px" CausesValidation="false" />
	</asp:Panel>
</asp:Content>
